package com.cheer.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cheer.dao.AccountUniqueSupportDao;
import com.cheer.entity.AccountUniqueSupport;
import com.cheer.service.AccountUniqueSupportService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

@Service
public class AccountUniqueSupportServiceImpl extends ServiceImpl<AccountUniqueSupportDao, AccountUniqueSupport>
        implements AccountUniqueSupportService {

    @Override
    public Set<String> accountSet() {

        List<AccountUniqueSupport> list = list();
        return list.stream().map(AccountUniqueSupport::getAccount).collect(Collectors.toSet());
    }

}
